#
#Political Shocks and Asset Prices
#
# Replication file
# 
#Code to generate figure C1 in Appendix C
#
# 
# Version July 28 2021 


mean1<- c(0.4718688,0.5691447,0.1464222,0.3579888,0.5463088)
lower1 <-  c(-.0239,0.0805,-.2040,-.054344,0.06049)
upper1 <-  c(0.7526,0.8458,0.3449,0.5915,0.8214)

name <- c("1970-1979 (n=23)", "1980-1989 (n=20)", "1990-1999 (n=12)", "2000-2009 (n=22)", "2010-2019 (n=21)")

y.axis <- length(name):1#create indicator for y.axis, descending so that R orders vars from top to bottom on y-axis
adjust <- .035 #create object that we will use to adjust points and lines up and down to distinguish between models

par(mar=c(2,8,2,2), lheight = .75)#set margins for regression plot
plot(mean1, y.axis+adjust, type = "p", axes = F, xlab = "", ylab = "", pch = 19, cex = 1, 
xlim = c(-1,1), xaxs = "r", main = " ") 
segments(lower1, y.axis+adjust, upper1, y.axis+adjust, lwd =  1.3)#dr

axis(1, at = seq(-1,1,by=.25), labels = NA, tick = T,#draw x-axis and labels with tick marks
    cex.axis = .75, mgp = c(2,.7,0))#reduce label size, moves labels closer to tick marks
axis(1, at = seq(-1,1,by=0.25), labels =  c(-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 1), tick = T,#draw x-axis and labels with tick marks
    cex.axis = .75, mgp = c(2,.7,0))
axis(2, at = y.axis+adjust, label = name, las = 1, tick = T, ,mgp = c(2,.75,0),
    cex.axis =1) #draw y-axis with tick marks, make labels perpendicular to axis and closer to axis
#segments(-.427,-.427,-.427,8,lty=2) # draw dotted line through 0
#abline(v= -.003451, lty = 2)
abline(v=.442257, lty = 2)
#
